(function($f) {	$f.extend.feature("myFeature1", "myPlugin1, myPlugin2", "6276921d-bf9a-4fd7-a2e6-399fce447cba", function(self) {

	"use strict";
	
	// feature info
	this.featureInfo = {
		title: "My Feature 1",
		version: "0.0.1" // major.minor.build
	};

	// external files which are to be loaded during initialization process
	// value of each item here should be 
	// { name: "", file: "", cond: "an optional function that returns true/false for conditional include" }
	// files are loaded in specified order one after another
	// files of following types can be included:
	// JavaScript (*.js), Stylesheets (*.css) and Templates (*.html) and any other type of files which
	// are defined in "dynamicHtmlEndPoints" configuration setting
	this.featureInclude = [
		{ name: "modernizrJS", file: "libs/modernizr.js", cond: function() { return true; } },
	];

	// pre-initialization handler
	// called just after feature instance is created any any merging or includes are processed
	// Note: Since 'self' carries plugin reference, to use feature instance reference, use 'this'
	// returns (boolean): true, if feature to be added, false otherwise
	this.onFeaturePreInit = function() {
		// any initialization goes here
		var isSuccess = true;

		// check if modernizr is available
		var log = "<p><b>onFeaturePreInit (for " + self.info.title + "):</b> ";
		if (window.Modernizr) {
			log += "Modernizr is loaded."; 
		} else {
			log += "Modernizr is not loaded."; 
		};
		
		// show
		$("#eventsLog").append(log);
		
		// return
		return isSuccess;
	};
	
	// initialization handler
	// called when feature is initialized, however yet not merged
	// Note: Since 'self' carries plugin reference, to use feature instance reference, use 'this'
	// returns (boolean): true, if feature to be added, false otherwise
	this.onFeatureInit = function() {
		// any initialization goes here
		var isSuccess = true;

		// show which files are processed and loaded and which not
		var log = "<p><b>onFeatureInit (for " + self.info.title + "): </b><br />";
		
		// NOTE: "this" is used instead of "self"
		// "this" refers to feature while "self" refers to plugin on which feature instance is added
		log += "modernizrJS: isProcessed = " + (this.featureInclude.isProcessed("modernizrJS") ? "Yes" : "No") + "<br />";
		log += "modernizrJS: isLoaded = " + (this.featureInclude.isLoaded("modernizrJS") ? "Yes" : "No") + "<br />";

		// show 
		var element = $("#eventsLog");
		element.append(log);	

		// return
		return isSuccess;
	};
	
}); }(fluid));
